package 线程安全.多线程;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Socket;
import java.util.Arrays;

public class Web implements Runnable {
    private Socket socket;

    public Web(Socket socket) {
        this.socket = socket;
    }

    @Override
    public void run() {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            String request = br.readLine();
            System.out.println(Arrays.toString(request.split(" ")));

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
